<?php
class MenuController extends Zend_Controller_Action {
	public function mainAction() {
	
	}
	
	public function loginAction() {
		$auth = Zend_Auth::getInstance ();
        if ($auth->hasIdentity ()) {
            $identity = $auth->getIdentity ();
            $role = strtolower ( $identity->role );
            $username =  $identity->username;

            $this->view->role = $role;
            $this->view->username = $username;
            
            $this->render ( "welcome" );
        } else { 
            $role = 'guest';
            $username =  'guest';
        }
	}
	
	/* load left navigation */
	public function leftmenuAction() {
		$mdlCategory = new Model_Category();
		$this->view->lstMenu = $mdlCategory->getListMenu();
	}
}
